import { NoSkinCellRenderer } from "../../common/item/NoSkinCellRenderer";
import { SRobIslandMiniPlayer } from "../../../../../Message/Game/SRobIslandMiniPlayer";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
//class PetIslandMapItemTipItemRenderer
    
    export  class PetIslandMapItemTipItemRenderer extends NoSkinCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            if (typeof arg1 === "srobislandminiplayer") 
            {
                this._name.defaultTextFormat.align = flash.text.TextFormatAlign.CENTER;
                this._name.text = SRobIslandMiniPlayer(data).name;
                this._life.text = SRobIslandMiniPlayer(data).life + "/" + SRobIslandMiniPlayer(data).maxLife;
            }
            return;
        }

        protected /* override */ createChildren(): void
        {
            var loc1=null;
            loc1 = GlobalStyle.setTextFormatAlign(GlobalStyle.textFormat1, flash.text.TextFormatAlign.CENTER);
            this._name = ObjCreate.createGTextField("", 0, 5, 100, 20, this, loc1);
            this._name.mouseEnabled = false;
            this._life = ObjCreate.createGTextField("", 100, 5, 130, 20, this, loc1);
            this._life.mouseEnabled = false;
            ObjCreate.createBg(0, 30, 230, 2, this, ImagesConst.SplitLine);
            return;
        }

        /* internal */ /* var */_name: GTextFiled;

        /* internal */ /* var */_life: GTextFiled;
    }
